#ifndef NORM_H
#define NORM_H

#include <iostream>
#include <vector>
#include <math.h>
#include "Eigen/Dense"

using namespace std;
using namespace Eigen;

class Norm
{
public:
    double onenorm(VectorXd v)
    {
        double sum = 0;
        for (int i = 0; i < v.size(); i++)
        {
            sum += abs(v(i));
        }
        return sum;
    }

    double twonorm(VectorXd v)
    {
        double sum = 0;
        for (int i = 0; i < v.size(); i++)
        {
            sum += pow(v(i), 2);
        }
        return sum;
    }

    double inftynorm(VectorXd v)
    {
        double m = 0;
        for (int i = 0; i < v.size(); i++)
        {
            if (m <= abs(v(i)))
                m = abs(v(i));
        }
        return m;
    }

    void output(vector<double> v)
    {
        for(int i = 0; i < v.size(); i++)
        {
            cout << v[i] << " " << endl;
        }

    }
};

#endif